using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Redis_demo.Controllers;
using Redis_demo.Entities;

namespace Redis_demo.EntityConfigs;

public class UserEntityConfig : IEntityTypeConfiguration<User>
{
    public void Configure(EntityTypeBuilder<User> builder)
    {
         builder.ToTable("User");
         builder.Property(x => x.Id).HasColumnName("ID").IsRequired();
         builder.Property(x => x.Name).HasColumnName("Name").HasMaxLength(200).IsRequired();
    }
}
